package com.oa.lms.apps.dao.user.impl;

import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.oa.lms.apps.dao.user.IUserInfoDao;
import com.oa.lms.apps.entity.user.UserInfoValue;

public class UserInfoDaoImpl extends HibernateDaoSupport implements IUserInfoDao {

	List<UserInfoValue> list;
	
	@Override
	public Integer add(UserInfoValue userInfoValue) {
		if (userInfoValue != null) {
			this.getHibernateTemplate().save(userInfoValue);
		}
		return userInfoValue.getInfoId();
	}

	@Override
	public void modify(UserInfoValue userInfoValue) {
		if (userInfoValue != null) {
			this.getHibernateTemplate().update(userInfoValue);
		}
	}

	@Override
	public UserInfoValue queryByInfoId(Integer infoId) {
		if (infoId != null) {
			return (UserInfoValue) this.getHibernateTemplate().get(UserInfoValue.class, infoId);
		}
		return null;
	}

	public List<UserInfoValue> getList() {
		return list;
	}

	public void setList(List<UserInfoValue> list) {
		this.list = list;
	}

}


